package demo;
//实现Runnable接口并重写run方法
public class MyTask implements Runnable{

    @Override
    public void run() {
        while(true){
            System.out.println("A");
        }
    }
    public static void main(String[] args) {
        Thread t=new Thread(new MyTask());
        t.start();
    }
}
